package com.company.project.core;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 统一API响应结果封装
 */
@Getter
@Setter
@Accessors(chain = true)
public class Result<T> {
    private int code;
    private String message;
    private T data;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
